<template>
  <div align="center">
    <el-card class="box-card" >
      <div slot="header" class="clearfix" style="line-height: 40px">
        <span style="float: left">新增调价</span>
        <el-button style="float: right;margin-right: 20px " type="success" plain @click="returnto()">返回</el-button>
      </div>
      <div>
        <el-table
          :data="druginfo"
          :header-cell-style="{background:'#5ddcf6',color:'#0a0a0d','text-align':'center','line-height': '40px'}"
          style="width: 100%;"
          :cell-style="{'text-align':'center'}">
          <el-table-column
            type="index"
            width="50">
          </el-table-column>

          <el-table-column
            prop="drugId"
            label="药品编码"
            width="120">
          </el-table-column>

          <el-table-column
            prop="name"
            label="药品名称"
            width="180">
          </el-table-column>

          <el-table-column
            prop="instorageNum"
            label="采购编号"
            width="100">
          </el-table-column>

          <el-table-column
            prop="specification"
            label="规格"
            width="100">
          </el-table-column>


          <el-table-column
            prop="manufacturer"
            label="生产厂家"
            width="180">
          </el-table-column>

          <el-table-column
            prop="repertory"
            label="库存量"
            width="80">
          </el-table-column>

          <el-table-column
            prop="number"
            label="批号"
            width="80">
          </el-table-column>

          <el-table-column
            prop="purchasePrice"
            label="采购价"
            width="60">
          </el-table-column>

          <el-table-column
            prop="retailPrice"
            label="原零售价"
            width="60">
          </el-table-column>
          <el-table-column
            prop="newRetailPrice"
            label="现零售价"
            width="60">
            <el-input v-model="druginfo.newRetailPrice" placeholder="请输入内容"></el-input>
          </el-table-column>
          <el-table-column
            prop="beizhu"
            label="备注"
            width="60">
          </el-table-column>
        </el-table>
        <div class="block">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[5, 10, 15, 20]"
            :page-size="10"
            layout="total, sizes, prev, pager, next, jumper"
            :total="10">
          </el-pagination>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        druginfo:[],
        currentPage4: 4,
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      },
      returnto(){
        this.$router.push("/drugAdjustPrice")
      },
      handleClick(tab, event) {
        console.log(tab, event);
      },
      //分页
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
      findAll:function () {
        this.druginfo=[{
          drugId:1111,
          name:1111,
          kind:1111,
          classify:1111,
          specification:1111,
          formulation:1111,
          invoice:1111,
          permitNo:1111,
          manufacturer:1111,
          isOtc:1111,
          status:1111,
          time:'2019-02-09 10:23:56',
          packingUnit:1111,
          factor:1111,
          units:1111,
          doseFactor:1111,
          doseUnit:1111,
          purchasePrice:1111,
          retailPrice:1111,
          newRetailPrice:'',
          attribute1:1111,
          attribute2:1111,
          repertory:300,
          instorageNum:1234567,
          number:12345,
          beizhu:''
        }]
      }
    },
    mounted(){
      this.findAll();
    }
  }
</script>

<style>
  .text {
    font-size: 14px;
  }

  .item {
    margin-bottom: 18px;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .clearfix:after {
    clear: both
  }

  .box-card {
    width: 75%;

  }
</style>
